#!/usr/bin/env python

import os,sys, re
from numpy import *
import csv

f=open("book_preface.txt")

mylist=f.readlines()
arr=[]
for i in mylist:
	j=0
	while j < len(i.strip()):
		#print i[j]
		arr.append(i[j])
		j+=1
		
writer = csv.writer(file('problem1.csv', 'w'))
writer.writerow(arr)

sys.exit(1)


"""
subsequent R:
tt=which(cvmat==1)
prev=tt[which(tt < length(cvmat))]
nx=prev+1
tot=length(prev)

"""